# -*- coding: utf-8 -*-
"""
Created on Fri Sep 20 17:09:47 2024

@author: Administrator
"""
class Person:
    def __init__(self,name,age):
        self.name = name
        self.age = age
        
    def greet(self):
        print(f"{self.__class__.__name__} : hi ,it is {self.name}")
    
class Employee(Person):
    def __init__(self, name, age,department):
        super().__init__(name,age)
        self.department=department
        
    def showInfo(self):
        print(f"{self.__class__.__name__} name:{self.name} age:{self.age} department:{self.department}")
        
e1 = Employee("bob", 40, "product design")

print("sub class method")
e1.showInfo()

print("parent class method")
e1.greet()